<% if question.is_a?(Question) %>
    <div class="question">
      <h4 class="blanc"><%= question.sujet %><br /></h4>
      <h5 class="blanc"><%= nombre_votes(question) %> votes</h5>
      <% if question.dateAffichage.eql?(Date.today) && session[:vote] != "voté" %>
          <div class="barre-vote-oui-non">
            <% form_tag :controller => 'questions', :action => :voter, :id => question.id do %>
                <span class="blanc radio-oui"><%= radio_button :reponse, :vote, 'oui' %>Oui</span>
                <span class="blanc radio-non"><%= radio_button :reponse, :vote, 'non' %>Non</span>
                <span class="bt-voter"><%= image_submit_tag "/images/bt_voter.png" %></span>
            <% end %>
          </div>
      <% end %>
      <% if !question.dateAffichage.eql?(Date.today) || session[:vote] == "voté" %>
          <div class="resultat_sondage">
            <span class="oui-non blanc">Oui</span>
            <div class="barre-oui-non oui" style="background-position: <%= taille_barre_oui(question) %>px 0px;">
            </div>
            <span class="pourcent blanc"><%= number_with_precision(pourcentage_oui(question), :precision => 1) %>%</span>
          </div>

          <div class="resultat_sondage">
            <span class="oui-non blanc">Non</span>
            <div class="barre-oui-non non" style="background-position: <%= taille_barre_non(question) %>px 0px;">
            </div>
            <span class="pourcent blanc"><%= number_with_precision(pourcentage_non(question), :precision => 1) %>%</span>
          </div>
      <% end %>

    </div>
<% else %>
    <% if date.eql?(Date.today) %>
        <h3>Pas de question aujourd'hui!</h3>
    <% elsif date.eql?(Date.yesterday) %>
        <h3>Pas de question hier!</h3>
    <% else %>
        <h3>Pas de question le <%= date.strftime("%d/%m/%Y") %></h3>
    <% end %>
<% end %>